<template>
  <div class="App">

    <el-button type="text" @click="dialogVisible = true">登录</el-button>
    <el-dialog
     title="饿了么"
     :visible.sync="dialogVisible"
     width="30%"
     :before-close="handleClose">
     <span></span>

     <template>
       <el-form label-width='80px'>
       <el-form-item label="用户名" >
          <el-input placeholder="请输入用户名"  v-model="userForm.username" prefix-icon='el-icon-user-solid'></el-input>
       </el-form-item>

       <el-form-item label="密码" >
          <el-input placeholder="请输入密码" :show-password='true' v-model="userForm.password" prefix-icon='el-icon-lock'></el-input>
       </el-form-item>
        </el-form>
     </template>

   <template #footer>

    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
   </template>

    </el-dialog>
  </div>
</template>

<script>
export default {
  data () {
    return {
      userForm: {
        username: '',
        password: ''
      },
      dialogVisible: false
    }
  }
}
</script>

<style>
</style>
